import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
import ParentView from '@/components/ParentView';

/**
 * Note: 路由配置项
 *
 * hidden: true                   // 当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
 * alwaysShow: true               // 当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
 *                                // 只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
 *                                // 若你想不管路由下面的 children 声明的个数都显示你的根路由
 *                                // 你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
 * redirect: noRedirect           // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
 * name:'router-name'             // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * meta : {
    noCache: true                // 如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
    title: 'title'               // 设置该路由在侧边栏和面包屑中展示的名字
    icon: 'svg-name'             // 设置该路由的图标，对应路径src/assets/icons/svg
    breadcrumb: false            // 如果设置为false，则不会在breadcrumb面包屑中显示
  }
 */

// 公共路由
export const constantRoutes = [{
  path: '/redirect',
  component: Layout,
  hidden: true,
  children: [{
    path: '/redirect/:path(.*)',
    component: (resolve) => require(['@/views/redirect'], resolve)
  }]
},
{
  path: '/login',
  component: (resolve) => require(['@/views/login'], resolve),
  hidden: true
},
{
  path: '/register',
  component: (resolve) => require(['@/views/register'], resolve),
  hidden: true
},
{
  path: '/retrieve',
  component: (resolve) => require(['@/views/retrieve'], resolve),
  hidden: true
},
{
  path: '/platform',
  component: (resolve) => require(['@/views/platform/info/index'], resolve),
  hidden: true
},
{
  path: '/platform/add',
  component: (resolve) => require(['@/views/platform/info/add'], resolve),
  hidden: true
},
{
  path: '/404',
  component: (resolve) => require(['@/views/error/404'], resolve),
  hidden: true
},
{
  path: '/401',
  component: (resolve) => require(['@/views/error/401'], resolve),
  hidden: true
},
{
  path: '',
  component: Layout,
  redirect: 'index',
  children: [{
    path: 'index',
    component: (resolve) => require(['@/views/index'], resolve),
    name: '概况',
    meta: {
      title: '概况',
      icon: 'dashboard',
      noCache: true,
      affix: true
    }
  }]
},
{
  path: '/user',
  component: Layout,
  hidden: true,
  redirect: 'noredirect',
  children: [{
    path: 'profile',
    component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
    name: 'Profile',
    meta: {
      title: '个人中心',
      icon: 'user'
    }
  }]
},
{
  path: '/dict',
  component: Layout,
  hidden: true,
  children: [{
    path: 'type/data/:dictId(\\d+)',
    component: (resolve) => require(['@/views/system/dict/data'], resolve),
    name: 'Data',
    meta: {
      title: '字典数据',
      icon: ''
    }
  }]
},
{
  path: '/job',
  component: Layout,
  hidden: true,
  children: [{
    path: 'log',
    component: (resolve) => require(['@/views/monitor/job/log'], resolve),
    name: 'JobLog',
    meta: {
      title: '调度日志'
    }
  }]
},
{
  path: '/gen',
  component: Layout,
  hidden: true,
  children: [{
    path: 'edit/:tableId(\\d+)',
    component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
    name: 'GenEdit',
    meta: {
      title: '修改生成配置'
    }
  }]
},
{
  path: '/product',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/product/info/data'], resolve),
    name: 'productData',
    meta: {
      title: '添加论文资料'
    }
  }]
},
{
  path: '/product',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:productUid(\\d+)',
    component: (resolve) => require(['@/views/product/info/data'], resolve),
    name: 'productData',
    meta: {
      title: '修改论文资料'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/gift/data'], resolve),
    name: 'Gift',
    meta: {
      title: '添加赠品活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:giftUid(\\d+)',
    component: (resolve) => require(['@/views/activity/gift/data'], resolve),
    name: 'Gifts',
    meta: {
      title: '修改赠品活动',
      noCache: true
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:giftUid(\\d+)',
    component: (resolve) => require(['@/views/activity/gift/view'], resolve),
    name: 'viewGift',
    meta: {
      title: '赠品活动详情'
    }
  }]
},
{
  path: '/product',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:productUid(\\d+)',
    component: (resolve) => require(['@/views/product/info/productDetail'], resolve),
    name: 'productDetail',
    meta: {
      title: '商品详情'
    }
  }]
},
{
  path: '/order',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:orderUid(\\d+)',
    component: (resolve) => require(['@/views/order/info/order'], resolve),
    name: 'order',
    meta: {
      title: '订单详情'
    }
  }]
},
{
  path: '/order',
  component: Layout,
  hidden: true,
  children: [{
    path: 'saleDetail',
    component: (resolve) => require(['@/views/order/sale/view'], resolve),
    name: 'saleDetail',
    meta: {
      title: '售后详情'
    }
  }]
},
{
  path: '/order',
  component: Layout,
  hidden: true,
  children: [{
    path: 'deliverCenter/:orderUid(\\d+)',
    component: (resolve) => require(['@/views/order/deliverCenter/view'], resolve),
    name: 'deliverCenter',
    meta: {
      title: '订单详情'
    }
  }]
},

{
  path: '/commodity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/broadcast/goods/notStorage/commodity'], resolve),
    name: 'commodity',
    meta: {
      title: '添加商品'
    }
  }]
},
{
  path: '/consoles',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/broadcast/info/console'], resolve),
    name: 'consoles',
    meta: {
      title: '控制台'
    }
  }]
},

{
  path: '/privilege',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/customer/levelPrivilege/privilege/index'], resolve),
    name: 'LevelPrivilege',
    meta: {
      title: '自定义权益'
    }
  }]
},
{
  path: '/selectInfo',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/info/selectInfo'], resolve),
    name: 'selectInfo',
    meta: {
      title: '活动设置'
    }
  }]
},
{
  path: '/selectInfo',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view',
    component: (resolve) => require(['@/views/activity/info/infoView'], resolve),
    name: 'selectInfo',
    meta: {
      title: '活动详情'
    }
  }]
},
{
  path: '/broadcastInfo',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/broadcast/info/broadcastInfo'], resolve),
    name: 'broadcastInfo',
    meta: {
      title: '创建直播间'
    }
  }]
},
{
  path: '/FullReduction',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/coupon/FullReduction'], resolve),
    name: 'FullReduction',
    meta: {
      title: '新建满减券'
    }
  }]
},

{
  path: '/ExchangeCoins',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCoins'], resolve),
    name: 'ExchangeCoins',
    meta: {
      title: '新建菠萝券'
    }
  }]
},

{
  path: '/ExchangeCoins',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCoins'], resolve),
    name: 'ExchangeCoins',
    meta: {
      title: '修改菠萝币劵'
    }
  }]
},

{
  path: '/ExchangeCoins',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCoinsView'], resolve),
    name: 'ExchangeCoinsView',
    meta: {
      title: '菠萝币券详情'
    }
  }]
},

{
  path: '/ExchangeCertificate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCertificate'], resolve),
    name: 'ExchangeCertificate',
    meta: {
      title: '新建兑换券'
    }
  }]
},

{
  path: '/ExchangeCertificate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCertificate'], resolve),
    name: 'ExchangeCertificate',
    meta: {
      title: '修改兑换券'
    }
  }]
},

{
  path: '/ExchangeCertificate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/ExchangeCertificateView'], resolve),
    name: 'ExchangeCertificateView',
    meta: {
      title: '兑换券详情'
    }
  }]
},

{
  path: '/FullReduction',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/FullReduction'], resolve),
    name: 'FullReduction',
    meta: {
      title: '修改满减劵'
    }
  }]
},

{
  path: '/FullReduction',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/FullReductionView'], resolve),
    name: 'view',
    meta: {
      title: '满减券详情'
    }
  }]
},
{
  path: '/product',
  component: Layout,
  hidden: true,
  children: [{
    path: 'warning',
    component: (resolve) => require(['@/views/product/warning/index'], resolve),
    name: 'WarningProduct',
    meta: {
      title: '商品预警列表 '
    }
  }]
},
{
  path: '/product',
  component: Layout,
  hidden: true,
  children: [{
    path: 'product',
    component: (resolve) => require(['@/views/product/warning/index'], resolve),
    name: 'EditProduct',
    meta: {
      title: '商品预警列表 '
    }
  }]
},

{
  path: '/luckDraw',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/lottery/luckDraw'], resolve),
    name: 'luckDraw',
    meta: {
      title: '新建奖品'
    }
  }]
},
{
  path: '/luckDraw',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:lotteryUid(\\d+)',
    component: (resolve) => require(['@/views/activity/lottery/luckDraw'], resolve),
    name: 'luckDraw',
    meta: {
      title: '修改奖品'
    }
  }]
},
{
  path: '/luckDraw',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:lotteryUid(\\d+)',
    component: (resolve) => require(['@/views/activity/lottery/lotteryView'], resolve),
    name: 'luckDraw',
    meta: {
      title: '奖品详情'
    }
  }]
},

{
  path: '/Discount',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/coupon/Discount'], resolve),
    name: 'Discount',
    meta: {
      title: '新建折扣券'
    }
  }]
},
{
  path: '/Discount',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/Discount'], resolve),
    name: 'Discount',
    meta: {
      title: '修改折扣劵'
    }
  }]
},
{
  path: '/Discount',
  component: Layout,
  hidden: true,
  children: [{
    path: 'view/:couponUid(\\d+)',
    component: (resolve) => require(['@/views/activity/coupon/DiscountView'], resolve),
    name: 'view',
    meta: {
      title: '折扣券详情'
    }
  }]
},
{
  path: '/input',
  component: Layout,
  hidden: true,
  children: [{
    path: 'productData',
    component: (resolve) => require(['@/views/dataCentre/productDataDetail/index'], resolve),
    name: 'productData',
    meta: {
      title: '商品数据 '
    }
  }]
},
{
  path: '/input',
  component: Layout,
  hidden: true,
  children: [{
    path: 'dataCentre/orderSituation',
    component: (resolve) => require(['@/views/dataCentre/orderDataDetail/index'], resolve),
    name: 'dataCentre/orderSituation',
    meta: {
      title: '订单数据 '
    }
  }]
},
{
  path: '/input',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/activity/info/input'], resolve),
    name: 'input',
    meta: {
      title: '新建活动'
    }
  }]
},
{
  path: '/input',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:activityUid(\\d+)',
    component: (resolve) => require(['@/views/activity/info/input'], resolve),
    name: 'input',
    meta: {
      title: '修改活动'
    }
  }]
},
{
  path: '/register',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/authorization/register'], resolve),
    name: 'register',
    meta: {
      title: '注册小程序'
    }
  }]
},
{
  path: '/payAudit',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/payAudit/index'], resolve),
    name: 'payAudit',
    meta: {
      title: '申请支付方式'
    }
  }]
},
{
  path: '/fastRegister',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/applet/authorization/fastRegister'], resolve),
    name: 'fastRegister',
    meta: {
      title: '快速注册'
    }
  }]
},
{
  path: '/chat',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/chat/index'], resolve),
    name: 'chat',
    meta: {
      title: '客服'
    }
  }]
},
{
  path: '/platform',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/platform/moudle/data'], resolve),
    name: 'postage',
    meta: {
      title: '添加模板信息'
    }
  }]
}, {
  path: '/platform',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:moudleUid(\\d+)',
    component: (resolve) => require(['@/views/platform/moudle/data'], resolve),
    name: 'postage',
    meta: {
      title: '修改模板信息'
    }
  }]
},
{
  path: '/broadcast',
  component: Layout,
  hidden: true,
  children: [{
    path: 'console/:broadcastIds(\\d+)',
    component: (resolve) => require(['@/views/applet/broadcast/info/console'], resolve),
    name: 'console',
    meta: {
      title: '商品预警列表 '
    }
  }]
},
//客户运营参数人群id
{
  path: '/updateOperation',
  component: Layout,
  hidden: true,
  children: [{
    path: 'updateOperation/:groupUid(\\d+)',
    component: (resolve) => require(['@/views/customer/CustomerOperation/updateOperation'], resolve),
    name: 'updateOperation',
    meta: {
      title: '客户运营编辑 '
    }
  }]
},
//客户运营参数运营id
{
  path: '/updateOperation',
  component: Layout,
  hidden: true,
  children: [{
    path: 'updateOperationEdit/:operationUid(\\d+)',
    component: (resolve) => require(['@/views/customer/CustomerOperation/updateOperation'], resolve),
    name: 'updateOperation',
    meta: {
      title: '客户运营编辑 '
    }
  }]
},

//客户运营参数运营id
{
  path: '/Operation',
  component: Layout,
  hidden: true,
  children: [{
    path: 'OperationDetail/:operationUid(\\d+)',
    component: (resolve) => require(['@/views/customer/CustomerOperation/OperationDetail'], resolve),
    name: 'updateOperation',
    meta: {
      title: '客户运营详情 '
    }
  }]
},

{
  path: '/cms/notice',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/platform/cms/notice/data'], resolve),
    name: 'noticeData',
    meta: {
      title: '添加业务信息',
      noCache: true
    }
  }]
},
{
  path: '/cms/notice',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/notice/data'], resolve),
    name: 'noticeData',
    meta: {
      title: '修改业务信息',
      noCache: true
    }
  }]
},
{
  path: '/cms/notice',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/notice/detail'], resolve),
    name: 'noticeDetail',
    meta: {
      title: '查看业务信息'
    }
  }]
},
{
  path: '/cms/platform',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/platform/cms/platform/data'], resolve),
    name: 'platformData',
    meta: {
      title: '添加网站协议'
    }
  }]
},
{
  path: '/cms/platform',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/platform/data'], resolve),
    name: 'platformData',
    meta: {
      title: '修改网站协议'
    }
  }]
},
{
  path: '/cms/platform',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/platform/detail'], resolve),
    name: 'platformDetail',
    meta: {
      title: '查看网站协议'
    }
  }]
},
{
  path: '/cms/information',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/platform/cms/information/data'], resolve),
    name: 'informationData',
    meta: {
      title: '添加关于我们'
    }
  }]
},
{
  path: '/cms/information',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/information/data'], resolve),
    name: 'informationData',
    meta: {
      title: '修改关于我们'
    }
  }]
},
{
  path: '/cms/information',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:cmsUid(\\d+)',
    component: (resolve) => require(['@/views/platform/cms/information/detail'], resolve),
    name: 'informationDetail',
    meta: {
      title: '查看关于我们'
    }
  }]
},
{
  path: '/supplier/add',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/supplier/info/establishSupplier'], resolve),
    name: 'Supplier',
    meta: {
      title: '创建供应商'
    }
  }]
},
{
  path: '/supplier/detail',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:supplierId(\\d+)',
    component: (resolve) => require(['@/views/supplier/info/supplierData'], resolve),
    name: 'Supplier',
    meta: {
      title: '供应商详细'
    }
  }]
},
{
  path: '/supplier/update',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:supplierId(\\d+)',
    component: (resolve) => require(['@/views/supplier/info/establishSupplier'], resolve),
    name: 'SupplierInfo',
    meta: {
      noCache: true,
      title: '修改供应商资料'
    }
  }]
},
{
  path: '/gift/card',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:batchId(\\d+)',
    component: (resolve) => require(['@/views/activity/card/giftBatch/card'], resolve),
    name: 'Card',
    meta: {
      title: '卡券详细信息'
    }
  }]
},
{
  path: '/customerLevelInfo',
  component: Layout,
  hidden: true,
  children: [{
    path: 'customerLevelInfo/:levelId(\\d+)',
    component: (resolve) => require(['@/views/customer/Info/index'], resolve),
    name: 'customerLevelInfo',
    meta: {
      title: '等级客户信息'
    }
  }]
},
{
  path: '/freePatternUpdate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'freePatternUpdate/:levelId(\\d+)',
    component: (resolve) => require(['@/views/customer/level/freePatternUpdate'], resolve),
    name: 'freePatternUpdate',
    meta: {
      title: '等级编辑'
    }
  }]
},
{
  path: '/freePatternUpdate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'freePatternUpdate/add',
    component: (resolve) => require(['@/views/customer/level/freePatternUpdate'], resolve),
    name: 'freePatternAdd',
    meta: {
      title: '等级添加'
    }
  }]
},
{
  path: '/payPatternUpdate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'payPatternUpdate/:levelId(\\d+)',
    component: (resolve) => require(['@/views/customer/level/payPatternUpdate'], resolve),
    name: 'payPatternUpdate',
    meta: {
      title: '付费等级编辑'
    }
  }]
},
{
  path: '/payPatternUpdate',
  component: Layout,
  hidden: true,
  children: [{
    path: 'payPatternUpdate',
    component: (resolve) => require(['@/views/customer/level/payPatternUpdate'], resolve),
    name: 'payPatternUpdate',
    meta: {
      title: '付费等级编辑'
    }
  }]
},
{
  path: '/group',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/customer/group/index'], resolve),
    name: 'group',
    meta: {
      title: '客户人群'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'bargain',
    component: (resolve) => require(['@/views/activity/info/bargain'], resolve),
    name: 'bargain',
    meta: {
      title: '砍价活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'seckill',
    component: (resolve) => require(['@/views/activity/info/seckill'], resolve),
    name: 'seckill',
    meta: {
      title: '秒杀活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'limittime',
    component: (resolve) => require(['@/views/activity/info/limittime'], resolve),
    name: 'limittime',
    meta: {
      title: '限时活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'group',
    component: (resolve) => require(['@/views/activity/info/group'], resolve),
    name: 'group',
    meta: {
      title: '团购活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'packages',
    component: (resolve) => require(['@/views/activity/info/packages'], resolve),
    name: 'packages',
    meta: {
      title: '套餐活动'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'free',
    component: (resolve) => require(['@/views/activity/info/free'], resolve),
    name: 'free',
    meta: {
      title: '新人免费领'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'score',
    component: (resolve) => require(['@/views/activity/info/score'], resolve),
    name: 'score',
    meta: {
      title: '积分兑换'
    }
  }]
},
{
  path: '/activity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'recharge',
    component: (resolve) => require(['@/views/activity/info/recharge'], resolve),
    name: 'recharge',
    meta: {
      title: '充值套餐'
    }
  }]
},
{
  path: '/item',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/service/item/data'], resolve),
    name: 'itemDataAdd',
    meta: {
      title: '添加服务项目信息'
    }
  }]
},
{
  path: '/item',
  component: Layout,
  hidden: true,
  children: [{
    path: 'editData/:itemId(\\d+)',
    component: (resolve) => require(['@/views/service/item/data'], resolve),
    name: 'itemDataEdit',
    meta: {
      title: '修改服务项目信息'
    }
  }]
},
{
  path: '/item',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:itemId(\\d+)',
    component: (resolve) => require(['@/views/service/item/detail'], resolve),
    name: 'itemDataDetail',
    meta: {
      title: '查看服务项目信息'
    }
  }]
},
{
  path: '/serviceActivity',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/service/activity/data'], resolve),
    name: 'activityDataAdd',
    meta: {
      title: '添加服务项目活动信息'
    }
  }, {
    path: 'editData/:activityId(\\d+)',
    component: (resolve) => require(['@/views/service/activity/data'], resolve),
    name: 'activityDataEdit',
    meta: {
      title: '修改服务项目活动信息'
    }
  }, {
    path: 'detail/:activityId(\\d+)',
    component: (resolve) => require(['@/views/service/activity/detail'], resolve),
    name: 'activityDataDetail',
    meta: {
      title: '查看服务项目活动信息'
    }
  }]
},
{
  path: '/serviceCard',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/service/card/data'], resolve),
    name: 'cardDataAdd',
    meta: {
      title: '添加套餐卡信息'
    }
  }, {
    path: 'editData/:cardId(\\d+)',
    component: (resolve) => require(['@/views/service/card/data'], resolve),
    name: 'cardDataEdit',
    meta: {
      title: '修改套餐卡信息'
    }
  }, {
    path: 'detail/:cardId(\\d+)',
    component: (resolve) => require(['@/views/service/card/detail'], resolve),
    name: 'cardDataDetail',
    meta: {
      title: '查看套餐卡信息'
    }
  }]
},
{
  path: '/signIn',
  component: Layout,
  hidden: true,
  children: [{
    path: 'setRule',
    component: (resolve) => require(['@/views/service/signIn/optSign'], resolve),
    name: 'signSetRule',
    meta: {
      title: '签到规则'
    }
  }]
},
{
  path: '/store',
  component: Layout,
  hidden: true,
  children: [{
    path: 'workbench/medicine',
    component: (resolve) => require(['@/views/workbench/medicineIndex'], resolve),
    name: 'workbenchMedicine',
    meta: {
      title: '医美工作台'
    }
  },
  {
    path: 'customerList/newCustomer',
    component: (resolve) => require(['@/views/workbench/makePlan'], resolve),
    name: 'workbenchMakePlan',
    meta: {
      title: '制定方案'
    }
  },
  {
    path: 'workbench/orderDetail',
    component: (resolve) => require(['@/views/workbench/orderDetail'], resolve),
    name: 'workbenchOrderDetail',
    meta: {
      title: '订单详情'
    }
  },
  {
    path: 'workbench/serviceOpt',
    component: (resolve) => require(['@/views/workbench/serviceOpt'], resolve),
    name: 'workbenchServiceOpt',
    meta: {
      title: '服务预约单'
    }
  },
  {
    path: 'workbench/life',
    component: (resolve) => require(['@/views/workbench/lifeIndex'], resolve),
    name: 'workbenchLife',
    meta: {
      title: '生美工作台'
    }
  }]
},
{
  path: '/store/employee',
  component: Layout,
  hidden: true,
  children: [{
    path: 'planCalendar',
    component: (resolve) => require(['@/views/planCalendar/index'], resolve),
    name: 'planCalendar',
    meta: {
      title: '排班日历'
    }
  }]
},
{
  path: '/customer',
  component: Layout,
  hidden: true,
  children: [{
    path: 'detail/:customerUid(\\d+)',
    component: (resolve) => require(['@/views/customer/Info/detail'], resolve),
    name: 'customerDetail',
    meta: {
      title: '客户详情'
    }
  },
  ]
},
{
  path: '/service/recharge',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data',
    component: (resolve) => require(['@/views/service/recharge/data'], resolve),
    name: 'rechargeAdd',
    meta: {
      title: '添加储值信息'
    }
  }, {
    path: 'editData/:rechargeId(\\d+)',
    component: (resolve) => require(['@/views/service/recharge/data'], resolve),
    name: 'rechargeEdit',
    meta: {
      title: '修改储值信息'
    },
   }]
},

{
  path: '/system/user',
  component: Layout,
  hidden: true,
  children: [{
    path: 'list',
    component: (resolve) => require(['@/views/system/user/index'], resolve),
    name: 'userIndex',
    meta: {
      title: '账号管理'
    }
  }]
},{
  path: '/subscribeService/record',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:subscribeId(\\d+)',
    component: (resolve) => require(['@/views/customerService/record/data'], resolve),
    name: 'subscribeData',
    meta: {
      title: '预约记录详情'
    }
  },
  ]
},
{
  path: '/newCustomer',
  component: Layout,
  hidden: true,
  children: [{
    path: 'data/:sheetId(\\d+)',
    component: (resolve) => require(['@/views/customerService/sheet/data'], resolve),
    name: 'sheetData',
    meta: {
      title: '面诊信息'
    }
  },
  ]
},
]

export default new Router({
  mode: 'hash', // 去掉url中的#
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRoutes
})
